<html>
<body bgcolor="#E6E6FA">
I am a main.
<iframe src="frame1.html"></iframe>
</body>
<script type="text/javascript">
if (typeof foo != "undefined")
	foo("main");
else
	alert("no foo in main");
	
alert(myVal);
myVal = 1992;
alert(myVal);
	
</script>
</html>